<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <link rel="stylesheet" href="../Static/css/pintuer.css">
    <link rel="stylesheet" href="../Static/css/admin.css">
    <script src="../Static/js/jquery.js"></script>
    <script src="../Static/js/pintuer.js"></script>
    <script src="../Static/js/respond.js"></script>
    <script src="../Static/js/admin.js"></script>
    <script type="text/javascript">
   
    
    function  check(){
    	  var str1 = document.getElementById("user_account").value.trim();
     	  var str2 = document.getElementById("user_password").value.trim();
     	  var str3 = document.getElementById("user_cname").value.trim();
     	  var str4 = document.getElementById("user_ename").value.trim();
     	  var str5 = document.getElementById("user_password").value.trim();
		  var reg=/[^\u4E00-\u9FA5]/;
     	  if(str1.length>20){    
     			alert("对不起，用户名输入过长!");
     		    document.getElementById("user_account").value="";
     			return false; 
     	    } 
     	  /* if(str3!=str5){
     		  alert("两次密码不一致");
     		  document.getElementById("user_cname").vaule="";
     		  return false;
     	  } */
     	  if(str2.length>32){
     		  	alert("对不起，密码输入过长");
     		  	document.getElementById("user_password").value="";
     		  	return false;
     	  }
     	  if(str3.match(reg)){
     		 	alert("对不起，请输入中文名!");
		        document.getElementById("user_cname").value="";
		        return false; 
     	  }
     	 if(str3.length>10){    
		        alert("对不起，中文名输入过长!");
		        document.getElementById("user_cname").value="";
		        return false; 
		    }
		 if(str4.length>50){    
		        alert("对不起，英文名输入过长!");
		        document.getElementById("user_ename").value="";
		        return false; 
		    }
     	  
    	if($("#user_account").val()=="")
    		{
    		alert("请输入账号!");
    		return false;
    		}
    	
    	else if($("#user_password").val()=="")
		{
		alert("请输入密码!");
		return false;
		}
    	
    	else if($("#user_password").val()!=$("#password").val())
    	{
    		alert("两次输入密码不一致，请确定后重新输入!");
    		return false;
    	}
    	else{
    		return true;
    	}
    }
    
   
    </script>
</head>
<body>
<div class="container">

   <div class="line">
        <div class="xs6 xm4 xs3-move xm4-move">
            <br /><br />
            
	<form method="post" class="form-x" action="create" id="registerForm">
	<div class="panel">
	<div class="panel-head text-center"><strong>用户注册系统</strong></div>
			<div class="label"><label for="sitename">账号</label></div>
			<div class="field">
			<input type="text" class="input" id="user_account" name="user.account" size="10" placeholder="请填写账号" data-validate=""/>
			</div>	
			
			<div class="label"><label for="sitename">密码</label></div>
			<div class="field">
			<input type="text" class="input" id="user_password" name="user.password" size="10" placeholder="请填写密码" data-validate=""/>
			</div>	
			
			<div class="label"><label for="sitename">确认密码</label></div>
			<div class="field">
			<input type="text" class="input" id="password"  size="10" placeholder="请确认密码" data-validate=""/>
			</div>	
			
			<div class="label"><label for="sitename">中文名</label></div>
			<div class="field">
			<input type="text" class="input" id="user_cname" name="user.cname" size="10" placeholder="请填写中文名" data-validate=""/>
			</div>
	
			<div class="label"><label for="sitename">英文名</label></div>
			<div class="field">
			<input type="text" class="input" id="user_ename" name="user.ename" size="10" placeholder="请填写英文名" data-validate=""/>
			</div>
			
			<div class="label"><label for="sitename">性别</label></div>
			<div class="field">
				<select id="user_sex" name="user.sex">
				  <option value ="男">男</option>
				  <option value ="女">女</option>
				</select>
			</div>
			
			<div class="label"><label for="sitename">部门ID</label></div>
			<div class="field">
			<input type="text" class="input" id="user_dept_id" name="user.dept_id" size="10" placeholder="请填写部门ID" data-validate=""/>
			</div>
			
			<div class="label"><label for="sitename">手机号码</label></div>
			<div class="field">
			<input type="text" class="input" id="user_mobile" name="user.mobile" size="10" placeholder="请填写手机号码" data-validate=""/>
			</div>
			
			<div class="label"><label for="sitename">邮箱</label></div>
			<div class="field">
			<input type="text" class="input" id="user_email" name="user.email" size="10" placeholder="请填写邮箱地址" data-validate=""/>
			</div>
			</div>
			<button type="submit" class="button button-block bg-main text-big" onclick="return check()">点击注册</button>
	</form>
</div>
</div>
</div>
</body>